.class public Lcom/xingbook/park/c/a/q;
.super Landroid/widget/RelativeLayout;


# instance fields
.field private a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

.field private b:Landroid/widget/LinearLayout;

.field private c:Landroid/widget/TextView;

.field private d:Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

.field private e:Landroid/app/Activity;

.field private f:Lcom/xingbook/park/b/f;


# direct methods
.method public constructor <init>(Landroid/app/Activity;F)V
    .locals 11

    const v10, 0x7f0a0049

    const/16 v9, 0xf

    const/4 v8, -0x1

    const/4 v7, -0x2

    const/4 v6, 0x0

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Lcom/xingbook/park/c/a/q;->e:Landroid/app/Activity;

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    new-instance v1, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    invoke-direct {v1, v0}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    iget-object v1, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    invoke-virtual {v1, v10}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;->setId(I)V

    iget-object v1, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    invoke-virtual {p0, v1}, Lcom/xingbook/park/c/a/q;->addView(Landroid/view/View;)V

    const/high16 v1, 0x4150

    mul-float/2addr v1, p2

    float-to-int v1, v1

    new-instance v3, Landroid/widget/RelativeLayout;

    invoke-direct {v3, v0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    const/high16 v2, 0x4d00

    invoke-virtual {v3, v2}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    new-instance v2, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v2, v8, v7}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    div-int/lit8 v4, v1, 0x2

    div-int/lit8 v5, v1, 0x2

    invoke-virtual {v3, v1, v4, v1, v5}, Landroid/widget/RelativeLayout;->setPadding(IIII)V

    const/16 v4, 0x8

    invoke-virtual {v2, v4, v10}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    invoke-virtual {v3, v2}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {p0, v3}, Lcom/xingbook/park/c/a/q;->addView(Landroid/view/View;)V

    new-instance v2, Landroid/widget/LinearLayout;

    invoke-direct {v2, v0}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    const v4, 0x7f0a004a

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setId(I)V

    iget-object v2, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v6}, Landroid/widget/LinearLayout;->setOrientation(I)V

    iget-object v2, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    const/16 v4, 0x15

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setGravity(I)V

    new-instance v2, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v2, v7, v7}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v9}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const/16 v4, 0xb

    invoke-virtual {v2, v4}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v4, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v2}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v2, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    new-instance v2, Landroid/widget/TextView;

    invoke-direct {v2, v0}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    invoke-virtual {v0, v8}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    const/high16 v2, 0x4200

    mul-float/2addr v2, p2

    invoke-virtual {v0, v6, v2}, Landroid/widget/TextView;->setTextSize(IF)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setSingleLine(Z)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    sget-object v2, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    mul-int/lit8 v1, v1, 0x5

    invoke-virtual {v0, v6, v6, v1, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v0, v7, v7}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v9}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const/16 v1, 0x9

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const v1, 0x7f0a004a

    invoke-virtual {v0, v6, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    invoke-static {p1}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->width:I

    iget-object v1, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    invoke-virtual {v3, v0}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    new-instance v0, Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    const/4 v2, 0x0

    iget-object v4, p0, Lcom/xingbook/park/c/a/q;->b:Landroid/widget/LinearLayout;

    iget-object v5, p0, Lcom/xingbook/park/c/a/q;->c:Landroid/widget/TextView;

    move-object v1, p1

    invoke-direct/range {v0 .. v5}, Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;-><init>(Landroid/app/Activity;Ljava/util/List;Landroid/widget/RelativeLayout;Landroid/widget/LinearLayout;Landroid/widget/TextView;)V

    iput-object v0, p0, Lcom/xingbook/park/c/a/q;->d:Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    const-wide/16 v1, 0x1b58

    invoke-virtual {v0, v1, v2}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;->setInterval(J)V

    return-void
.end method


# virtual methods
.method public a(Lcom/xingbook/park/b/f;Z)V
    .locals 7

    const/4 v1, 0x1

    const/4 v2, 0x0

    const/4 v6, -0x1

    iput-object p1, p0, Lcom/xingbook/park/c/a/q;->f:Lcom/xingbook/park/b/f;

    if-eqz p1, :cond_2

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->g()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_2

    invoke-virtual {p0, v2}, Lcom/xingbook/park/c/a/q;->setVisibility(I)V

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->e()I

    move-result v0

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->f()I

    move-result v3

    iget-object v4, p0, Lcom/xingbook/park/c/a/q;->e:Landroid/app/Activity;

    invoke-static {v4}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v4

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->d()Z

    move-result v5

    if-eqz v5, :cond_0

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->e()I

    move-result v5

    if-lez v5, :cond_0

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->f()I

    move-result v5

    if-lez v5, :cond_0

    iget-object v4, p0, Lcom/xingbook/park/c/a/q;->e:Landroid/app/Activity;

    invoke-static {v4}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v4

    mul-int/2addr v3, v4

    div-int v0, v3, v0

    :goto_0
    iget-object v3, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    new-instance v4, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v4, v6, v0}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v3, v4}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->d:Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->g()Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v0, v3}, Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;->setData(Ljava/util/ArrayList;)V

    iget-object v3, p0, Lcom/xingbook/park/c/a/q;->d:Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->g()Ljava/util/ArrayList;

    move-result-object v0

    if-eqz v0, :cond_1

    invoke-virtual {p1}, Lcom/xingbook/park/b/f;->g()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-le v0, v1, :cond_1

    move v0, v1

    :goto_1
    invoke-virtual {v3, v0}, Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;->setInfiniteLoop(Z)Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    iget-object v1, p0, Lcom/xingbook/park/c/a/q;->d:Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    invoke-virtual {v0, v1}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;->setAdapter(Landroid/support/v4/view/PagerAdapter;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    iget-object v1, p0, Lcom/xingbook/park/c/a/q;->d:Lcn/trinea/android/view/autoscrolladapter/AutoViewPagerAdapter;

    invoke-virtual {v0, v1}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;->setOnPageChangeListener(Landroid/support/v4/view/ViewPager$OnPageChangeListener;)V

    iget-object v0, p0, Lcom/xingbook/park/c/a/q;->a:Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;

    invoke-virtual {v0}, Lcn/trinea/android/view/autoscrollviewpager/AutoScrollViewPager;->startAutoScroll()V

    :goto_2
    return-void

    :cond_0
    const/high16 v0, 0x43be

    mul-float/2addr v0, v4

    float-to-int v0, v0

    goto :goto_0

    :cond_1
    move v0, v2

    goto :goto_1

    :cond_2
    const/16 v0, 0x8

    invoke-virtual {p0, v0}, Lcom/xingbook/park/c/a/q;->setVisibility(I)V

    goto :goto_2
.end method

.method public getResType()I
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public setData(Lcom/xingbook/park/b/f;)V
    .locals 1

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lcom/xingbook/park/c/a/q;->a(Lcom/xingbook/park/b/f;Z)V

    return-void
.end method
